package com.cy.pj.module.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class ModelViewController {
    @RequestMapping("/doModelAndView")
    public String doModelAndView(Model model) {
        model.addAttribute("username", "kewei");
        model.addAttribute("state", "enable");
        return "view";
    }

//    @RequestMapping("/doModelAndView2")
//    public MoelAndView doModelAndView(MoelAndView mv) {
//        //MoelAndView mv = MoelAndView();
//        model.addAttribute("username", "kewei");
//        model.addAttribute("state", "enable");
//        return mv;
//    }

}
